<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>About the Java Source Editor</title>
<link rel="stylesheet" href="ide.css" title="Oracle BLAFDoc" type="text/css"/>
</head>

<body>
<p><a id="text.x-java" name="text.x-java"></a></p>
<div id="NBCSH2493"><!-- infolevel="all" infotype="General" --><a id="sthref334" name="sthref334"></a>
<h1>About the Java Source Editor</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>Use to edit Java source files. 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG481">
<param name="text" value="<html><u>How?</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p><b>Source Editor Tabs and Commands</b></p>
<p>The top of the Source Editor has a tab for each open document. Each tab shows the name of the document. If the document has been modified and has not been saved, there is an asterisk (<code dir="ltr">*</code>) after its name.</p>
<p>If multiple files are open, you can split the Source Editor view by clicking and dragging the tab. As you drag to different parts of the editing area, you see a red outline that shows you where the new window will open. When one of these boxes appears, you can drop the document and split the pane.</p>
<p>Close the split file if you want the editor to return to its unsplit state.</p>

<table summary="Descriptions of file commands." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="38%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t2">Element</th>
<th align="left" valign="bottom" id="r1c2-t2">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t2" headers="r1c1-t2">
<p>Close All</p>
</td>
<td align="left" headers="r2c1-t2 r1c2-t2">Closes all files that are open in the Source Editor area.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t2" headers="r1c1-t2">
<p>Close Other</p>
</td>
<td align="left" headers="r3c1-t2 r1c2-t2">Closes all files except for the selected file.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t2" headers="r1c1-t2">
<p>Clone</p>
</td>
<td align="left" headers="r4c1-t2 r1c2-t2">Opens a new tab for the same document. This command is particularly useful in combination with splitting the window so that you can view different parts of the same file simultaneously.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t2" headers="r1c1-t2">
<p>Close Window</p>
</td>
<td align="left" headers="r5c1-t2 r1c2-t2">Closes the selected file.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t2" headers="r1c1-t2">
<p>Maximize Window</p>
</td>
<td align="left" headers="r6c1-t2 r1c2-t2">Hides other windows and expands the Source Editor to use all of the window space in the IDE. Toggles to <b>Restore Window</b>.
<p>You can also maximize and restore the Source Editor by double-clicking a tab</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t2" headers="r1c1-t2">Restore Window</td>
<td align="left" headers="r7c1-t2 r1c2-t2">Returns the windows to the state that they were before you chose Maximize Window. Toggles to <b>Maximize Window</b>.
<p>You can also maximize and restore the Source Editor by double-clicking a tab.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t2" headers="r1c1-t2">
<p>Float</p>
</td>
<td align="left" headers="r8c1-t2 r1c2-t2">Opens a floating IDE window with the tab.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r9c1-t2" headers="r1c1-t2">
<p>Dock</p>
</td>
<td align="left" headers="r9c1-t2 r1c2-t2">Restores the tab to the main window, if the tab is floating in a separate window, and closes the floating window.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r10c1-t2" headers="r1c1-t2">
<p>New Document Tab Group</p>
</td>
<td align="left" headers="r10c1-t2 r1c2-t2">Splits the editor window into two groups of tabs and separates the selected tab into the new group. Toggles to Collapse Document Tab Group.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r11c1-t2" headers="r1c1-t2">Collapse Document Tab Group</td>
<td align="left" headers="r11c1-t2 r1c2-t2">Combines separate group of tabs into one group. Toggles to New Document Tab Group.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r12c1-t2" headers="r1c1-t2">Select in Projects</td>
<td align="left" headers="r12c1-t2 r1c2-t2">Highlights the document in the Projects window.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r13c1-t2" headers="r1c1-t2">Show Local History</td>
<td align="left" headers="r13c1-t2 r1c2-t2">Opens a window where you <code dir="ltr">diff</code> the changes you made to the file since you last saved it.
<p>The History tab on the toolbar also opens this window.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r14c1-t2" headers="r1c1-t2">[version control]</td>
<td align="left" headers="r14c1-t2 r1c2-t2">Opens a list of commands for the version control system.
<p>Available if the document is under version control. A menu item with the name of the version control system is listed.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r15c1-t2" headers="r1c1-t2">Diff to...</td>
<td align="left" headers="r15c1-t2 r1c2-t2">Opens a diff window where you can <code dir="ltr">diff</code> the selected document either to another open file or to a file anywhere on your file system.</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<p><b>Source Editor Elements</b></p>
<p>Use to facilitate navigating, locating specific areas of a file, and editing source files.</p>

<table summary="User interface elements and descriptions" dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="38%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t3">Element</th>
<th align="left" valign="bottom" id="r1c2-t3">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t3" headers="r1c1-t3">
<p>Toolbar</p>
</td>
<td align="left" headers="r2c1-t3 r1c2-t3">The editor toolbar is at the top of the Source Editor window. The toolbar has buttons for various navigating and editing shortcuts, which vary according to the type of file you are editing.
<p>Hold the cursor over a button to display a description of the command.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t3" headers="r1c1-t3">
<p>Left Margin</p>
</td>
<td align="left" headers="r3c1-t3 r1c2-t3">The left margin displays annotation glyphs that indicate line status, such as breakpoints, the program counter, or build errors.
<p>Click the left margin of a Java file to set a breakpoint on the corresponding line. Click the left margin of a line to remove a breakpoint.</p>
<p>Right-click the left margin to display a context menu. The margin can also optionally display line numbers.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t3" headers="r1c1-t3">
<p>Error Stripe</p>
</td>
<td align="left" headers="r4c1-t3 r1c2-t3">The error stripe is the strip to the right of the right scroll bar and contains marks for various things in your file, such as errors, bookmarks, and comments for the To Do list.
<p>The error stripe represents the whole file, not just the lines currently displayed. You can immediately identify whether your file has any errors without having to scroll through the entire file.</p>
<p>Double-click a mark in the error stripe to jump to the line that the mark refers to.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t3" headers="r1c1-t3">
<p>Status Line</p>
</td>
<td align="left" headers="r5c1-t3 r1c2-t3">The Source Editor status line is beneath the horizontal scroll bar. The first area of the status line shows the current line number and row number in the form <code dir="ltr">line:row</code>.
<p>The second area of the status line indicates the insertion mode (INS or OVR). The text area on the right is used for status messages.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t3" headers="r1c1-t3">
<p>Syntax Coloring</p>
</td>
<td align="left" headers="r6c1-t3 r1c2-t3">Source code displayed in the Source Editor is syntactically colored. For example, all Java keywords are shown in blue and all Java comments in light gray.
<p>Guarded blocks of Java code generated by the GUI Builder have a light blue background and cannot be edited.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t3" headers="r1c1-t3">
<p>Code Completion</p>
</td>
<td align="left" headers="r7c1-t3 r1c2-t3">The IDE's code completion feature fills in code and tags as you type. Code completion is available for Java, JSP, HTML, XML, and Ant files.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t3" headers="r1c1-t3">
<p>Pair Completion</p>
</td>
<td align="left" headers="r8c1-t3 r1c2-t3">The Source Editor does matching of pair characters such as brackets, parentheses, and quotation marks as you edit Java classes.
<p>Closing characters are not duplicated if you type them yourself rather than letting the editor add them for you.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r9c1-t3" headers="r1c1-t3">
<p>Insert Mode and Overwrite Mode</p>
</td>
<td align="left" headers="r9c1-t3 r1c2-t3">In insert mode, the default insertion point is a vertical bar, and text that you type is inserted.
<p>In overwrite mode, the default insertion point is a solid block, and text that you type replaces the existing text.</p>
<p>Use the Insert key to toggle between the two modes.</p>
<p>Whenever the insertion point in the Source Editor is located immediately after a brace, bracket, or parenthesis, the matching brace, bracket, or parenthesis is highlighted.</p>
</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<p>If the Source Editor beeps when you try to enter new text, the file is a read-only file.</p>
<a id="NBCSH2510" name="NBCSH2510"></a>
<hr><p><b>Related Topics</b></p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG480">
<param name="text" value="<html><u>&quot;About Working with Java Code&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG547">
<param name="text" value="<html><u>&quot;Refactoring Java Projects&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>

<!-- -->
<!-- Start Footer -->


<table summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="legal_notice.htm">
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.</a>
</td>
</tr>
</table>
<!-- -->
</body>
</html>
